<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>DBD::Sponge::db prepare failed</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="The Bugzilla Guide - 3.6.4 
    Release"
HREF="index.html"><LINK
REL="UP"
TITLE="Troubleshooting"
HREF="troubleshooting.html"><LINK
REL="PREVIOUS"
TITLE="I installed a Perl module, but 
      checksetup.pl claims it's not installed!"
HREF="trbl-perlmodule.html"><LINK
REL="NEXT"
TITLE="cannot chdir(/var/spool/mqueue)"
HREF="paranoid-security.html"></HEAD
><BODY
CLASS="section"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Bugzilla Guide - 3.6.4 
    Release</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="trbl-perlmodule.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix A. Troubleshooting</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="paranoid-security.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="trbl-dbdSponge"
>A.4. DBD::Sponge::db prepare failed</A
></H1
><P
>The following error message may appear due to a bug in DBD::mysql
    (over which the Bugzilla team have no control):
    </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
> DBD::Sponge::db prepare failed: Cannot determine NUM_OF_FIELDS at D:/Perl/site/lib/DBD/mysql.pm line 248.
  SV = NULL(0x0) at 0x20fc444
  REFCNT = 1
  FLAGS = (PADBUSY,PADMY)
</PRE
></FONT
></TD
></TR
></TABLE
><P
>To fix this, go to 
    <TT
CLASS="filename"
>&#60;path-to-perl&#62;/lib/DBD/sponge.pm</TT
> 
    in your Perl installation and replace
    </P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
> my $numFields;
 if ($attribs-&#62;{'NUM_OF_FIELDS'}) {
     $numFields = $attribs-&#62;{'NUM_OF_FIELDS'};
 } elsif ($attribs-&#62;{'NAME'}) {
     $numFields = @{$attribs-&#62;{NAME}};
</PRE
></FONT
></TD
></TR
></TABLE
><P
>with</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
> my $numFields;
 if ($attribs-&#62;{'NUM_OF_FIELDS'}) {
     $numFields = $attribs-&#62;{'NUM_OF_FIELDS'};
 } elsif ($attribs-&#62;{'NAMES'}) {
     $numFields = @{$attribs-&#62;{NAMES}};
</PRE
></FONT
></TD
></TR
></TABLE
><P
>(note the S added to NAME.)</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="trbl-perlmodule.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="paranoid-security.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>I installed a Perl module, but 
      <TT
CLASS="filename"
>checksetup.pl</TT
> claims it's not installed!</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="troubleshooting.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>cannot chdir(/var/spool/mqueue)</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>